package com.xb.cloud.order.service.client;

import java.util.List;

import com.xb.cloud.order.service.client.bo.SoSkuSummeryBo;
import com.xb.cloud.product.merchant.service.client.bo.EndMerchantUserBo;
import com.xb.cloud.product.merchant.service.client.bo.ProductSkuBo;
import com.xb.cloud.service.client.ServiceReturnInfo;

/**
 * @author kexue
 *
 */
public interface ProductStockService {

	/**
	 * 插入库存(shop+product)
	 * 
	 * @param endMerchantUserBo
	 * @param productId
	 * @param stockNum
	 * @param warehouseId
	 * @return
	 */
	public ServiceReturnInfo createProductStock(EndMerchantUserBo endMerchantUserBo, Long productId, Long stockNum,
			Long warehouseId);

	/**
	 * 根据， 产品+店铺+仓库 的id 查询对应的库存记录 product_stock
	 * 
	 * @return
	 */
	public ServiceReturnInfo getProductStockByProductShopWarehouse( Long productId, Long shopId,
			Long warehouseId);
	
	/**
	 * 根据， 产品列表+店铺+仓库 的id 查询对应的库存记录 product_stock
	 * 
	 * @return
	 */
	public ServiceReturnInfo getProductStockByProductListShopWarehouse( List<Long> productIdList, 
			Long shopId, Long warehouseId);
	
	public ServiceReturnInfo updateStockForMerchant(List<SoSkuSummeryBo> sellOrderSkuBoList,
			  Long warehouseId,int tagetOrderStatus,EndMerchantUserBo endMerchantUserBo);

	ServiceReturnInfo updateStock(EndMerchantUserBo endMerchantUserBo,ProductSkuBo productSkuBo,Long realStockNum);

	public ServiceReturnInfo deleteStock(EndMerchantUserBo endMerchantUserBo, Long shopId, Long productId);	
}
